/***************************************************************************************************
*	file name:	.h
*	created:	2018-04-24
*	author:		innizhang
*	version:	1.0
*	purpose:
*
*	revision:
*
***************************************************************************************************/

#ifndef _COMMON_TYPEDEF_H_
#define _COMMON_TYPEDEF_H_

#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#include <WinUser.h>
#endif

#ifdef __GNUC__
#include <stdint.h>
#include <inttypes.h>
#endif

#if defined(WIN32) || defined(_WIN32)
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;

#elif defined(_WIN64)
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef long int64_t;
typedef unsigned long uint64_t;
#endif

#if defined(WIN32) || defined(_WIN32)
#pragma warning(disable : 4996)
#pragma warning(disable : 4005)
#endif

#if defined(WIN32) || defined(_WIN32)
#define OS_WIN32 1;
#else
#define OS_LINUX 1;
#endif

#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
  TypeName(const TypeName &);              \
  void operator=(const TypeName &)

#endif
